home *** CD-ROM | disk | FTP | other *** search
- {
- [Scriptsettings]
- Scriptname=PHP singleline comment
- ExecuteOnStartup=0
- ExecuteOnlyOnce=0
- }
- program PHPSingleLineComment;
-
- function CommentIt(s: string) : string;
- var
- TempList: TStringList;
- Temp: string;
- i: integer;
- begin
- TempList := TStringList.Create;
- TempList.Text := s;
- for i := 0 to TempList.Count - 1 do
- if TempList.Strings[i] <> '' then
- Temp := Temp + '//'+TempList.Strings[i]+#13#10;
- TempList.Free;
- Result := Temp;
- end;
-
- var
- Code: string;
- begin
- Code := GetSelText;
- SetSelText(CommentIt(Code));
- end.
-